#pragma once
#include "Sort.h"
#include <iostream>
using namespace std;
template<class T> class MyArray
{
protected :
	T * m_data;
	int m_count;
	static const int MAX_COUNT = 100;
public:
	void add(T t)
	{
		if(m_count == MAX_COUNT)
		{
			cout<<"Khong the them phan tu vao mang "<<endl;
			return;
		}
		this->m_data[m_count] = t;
		m_count ++;
	}
	void sort(Sort<T> * s)
	{
		s->sortArray(this->m_data,this->m_count);
	}
	int getCount()
	{

	}
	friend ostream & operator << (ostream & os,const MyArray<T> & arr)
	{
		for(int i=0;i<arr.m_count;i++)
		{
			os<<arr.m_data[i] <<"  ";
		}
		os<<endl;
		return os;
	}
	MyArray<T>(void)
	{
		this->m_count = 0;
		this->m_data = new T[MAX_COUNT];
	}
	~MyArray(void)
	{
		delete []this->m_data;
	}
};
